package de.haw.HESextern.Transport;

public class TransportServiceExternImpl implements TransportServiceExtern {
	
	private TransportTabCache cacheObject;
	
	public TransportServiceExternImpl() {
		cacheObject = new TransportTabCacheMock();
	}

	@Override
	public Boolean isDeliveryFinished(TransportId id) {
		TransportComplex obj = cacheObject.getTransportById(id);
		if(obj == null) {
			throw new RuntimeException();
		}
		return obj.getDelivered();
	}

}
